#include <algorithm>
#include <cstdio>

const int N = 300005;
int n, m, usedcol = 1, usedrow = 1;
int a[N], b[N];

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#endif
#ifndef LOCAL
  freopen("CppTest.in", "r", stdin);
  freopen("CppTest.out", "w", stdout);
#endif
#endif

  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%d", a + i);
  for (int j = 1; j <= m; ++j) scanf("%d", b + j);
  std::sort(a + 1, a + n + 1);
  std::sort(b + 1, b + m + 1);
  int *A = a + 2, *B = b + 2;
  long long ans = 1ll * a[1] * (m - 1) + 1ll * b[1] * (n - 1);
  while (usedrow <= n && usedcol <= m) {
    if (*A < *B) {
      ans += 1ll * (*A) * (m - usedcol), ++A, ++usedrow;
    } else {
      ans += 1ll * (*B) * (n - usedrow), ++B, ++usedcol;
    }
  }
  printf("%lld", ans);
  return 0;
}